﻿$$(function () {
    jumpSet();
    init_data();
});

var data = {
    money: 100,
    income: 200
};
//初始化界面数据
function init_data() {
    set_data(data);
}

//数据赋值
function set_data(data) {
    if (data != null) {
        var _money = $$("#money");
        if (!isNaN(data.money)) {
            _money.text(data.money.toFixed(2));
        }
        var _income = $$("#income");
        if (!isNaN(data.income)) {
            _income.text("累计收益:" + data.income.toFixed(2) + "元");
        }
    }
}
//跳转设置
function jumpSet() {
    var lis = $$(".list-block ul>li");
    //充值
    lis.eq(0).click(function () {
        location.href = "charge.html";
    });
    //提现
    lis.eq(1).click(function () {
        location.href = "draw.html";
    });
    //我的理财
    lis.eq(2).click(function () {
        location.href = "manage.html";
    });
    //资金明细
    lis.eq(3).click(function () {
        location.href = "detail.html";
    });
}